import Request from './vBase/axios/http.js'
import successMp3 from './static/mp3/success.wav'
import warningMp3 from './static/mp3/warning.wav'
import errorMp3 from './static/mp3/error.wav'

const http = new Request()
http.setConfig((config) => { /* 设置全局配置 */
    config.baseUrl = 'http://8.142.18.200/xqc_api/v1.0/' /* 根域名不同 */
    // config.baseUrl = 'https://test.vtumap.com/xqc_api/v1.0/' /* 根域名不同 */
    // #ifdef H5
    config.baseUrl = '/xqc_api/v1.0/' /* 根域名不同 */
    // #endif
    config.header = {
        ...config.header
    }
    return config
})

/**
 * 自定义验证器，如果返回true 则进入响应拦截器的响应成功函数(resolve)，否则进入响应拦截器的响应错误函数(reject)
 * @param { Number } statusCode - 请求响应体statusCode（只读）
 * @return { Boolean } 如果为true,则 resolve, 否则 reject
 */
http.validateStatus = (statusCode) => {
    return statusCode === 200
}

http.interceptor.request(async (config, cancel) => { /* 请求之前拦截器 */
    config.header = {
        ...config.header,
        b: 1,
        vt: uni && uni.getStorageSync && uni.getStorageSync("token") ? uni.getStorageSync("token") : ''
    }
    if (config.loading) {
        uni.showLoading({
            title: config.loadingLabel || '处理中'
        })
    }
    return config
})

http.interceptor.response((response, config) => {
    if (response.config.loading) {
        uni.hideLoading();
    }
    if (typeof (response.data) === 'string') {
        response.data = JSON.parse(response.data)
    }
    if (!response.data.res) {
        if (response.data.code === 'E_not_login') {
            uni.removeStorageSync("token")
            uni.removeStorageSync("userInfo")
            uni.removeStorageSync("localToken")
			uni.reLaunch({
			    url: "/pages/login/login"
			})
        } else if (response.config.dialog) {
			if (response?.data?.err && "箱号已入库!" === response.data.err) {
				handleMediaPlayer('warning')
			}
            uni.showModal({
            	title: '提示',
				content: response.data.err
            })
		} else {
			if (response?.data?.err && "箱号已入库!" === response.data.err) {
				handleMediaPlayer('warning')
			}
			uni.showToast({
			    title: response.data.err,
			    icon: 'none'
			})
		}
        return Promise.reject(response)
    }
	if (response.data.res && response.data.excList && response.data.excList.length) {
		let arr = response.data.excList ?? []
		const uniqueArr = arr.reduce((acc, cur) => {
		  if (!acc.includes(cur)) {
		    acc.push(cur);
		  }
		  return acc;
		}, []);
		if (uniqueArr.includes("箱号已入库!")) {
			handleMediaPlayer('warning')
		}
		uni.showToast({
		    title: uniqueArr.join(","),
		    icon: 'none'
		})
		return Promise.reject(response)
	}
    if (response.config.successLabel) {
        uni.showToast({
            title: response.config.successLabel,
            icon: 'none'
        })
    }
    return response.data
}, (response) => { // 请求错误做点什么
    return response
})

export const handleMediaPlayer = (type) => {
	let innerAudioContext = uni.createInnerAudioContext();
	innerAudioContext.autoplay = true;
	innerAudioContext.src = type === 'success' ? successMp3 : (type === 'warning' ? warningMp3 : errorMp3);
	innerAudioContext.onPlay();
	setTimeout(() => {
		innerAudioContext.destroy()
	}, 300)
	innerAudioContext.onError((res) => {
		innerAudioContext.destroy();
		innerAudioContext = uni.createInnerAudioContext();
	});
}

export default {
    /**
     * 系统登录
     */
    login: (data, opts = {}) => {
        return http.post("customer/vtuzx_login", data, opts)
    },

    /**
     * 检查版本更新
     */
    checkUpdate: (data, opts = {}) => {
        return http.post("appEdition/checkUpdate", data, opts)
    },
    /**
     * 登陆持久化
     */
    loginPersistence: (data, opts = {}) => {
        return http.post("customer/local_token_login", data, opts)
    },
    /**
     * 查询字典数据
     */
    getChildDictionaryListByKeys: (data, opts = {}) => {
        return http.post("setting/dict/get_options_by_token", data, opts)
    },
    /**
     * 获取手机验证码
     */
    getTelCode: (data, opts = {}) => {
        return http.post("user/get_code_by_mobile", data, opts)
    },
    /**
     * 查询用户信息
     */
    getUserInfo: (data, opts = {}) => {
        return http.post("user/get_user_info", data, opts)
    },
    /**
     * 退出登录
     */
    logout: (data, opts = {}) => {
        return http.post("user/mobile_logout", data, opts)
    },

    /**
     * ************************************
     * 入库模块接口
     * ************************************
     */

    /**
     * 获取用户的仓库
     * @param data
     * @param opts
     * @returns {Promise<unknown>}
     */
    getCustomerStock: (data, opts = {}) => {
        return http.post("basic/get_customer_stock", data, opts)
    },
	
	/**
	 * 获取仓位信息
	 * @param data
	 * @param opts
	 * @returns {Promise<unknown>}
	 */
	getStockLocation: (data, opts = {}) => {
	    return http.post("basic/get_stock_location", data, opts)
	},
	
    /**
     * 根据箱号从采购收货单中获取物料
     * @param data
     * @param opts
     * @returns {Promise<unknown>}
     */
    getMaterialByBox: (data, opts = {}) => {
        return http.post("pur_col/get_material_by_box", data, opts)
    },
	
    /**
     * 添加用户临时采购入库物料箱号
     * @param data
     * @param opts
     * @returns {Promise<unknown>}
     */
    addUserPurInMaterialBox: (data, opts = {}) => {
        return http.post("pur_in/add_user_purin_material_box", data, opts)
    },
	
    /**
     * 获取用户的入库物料列表
     * @param data
     * @param opts
     * @returns {Promise<unknown>}
     */
    getUserPurInMaterial: (data, opts = {}) => {
        return http.post("pur_in/get_user_purin_material", data, opts)
    },

    /**
     * 获取用户的入库物料箱号列表
     * @param data
     * @param opts
     * @returns {Promise<unknown>}
     */
    getUserPurInMaterialBox: (data, opts = {}) => {
        return http.post("pur_in/get_user_purin_material_box", data, opts)
    },
	
    /**
     * 查询入库列表详情
     * @param data
     * @param opts
     * @returns {Promise<unknown>}
     */
    getPurinTempDetail: (data, opts = {}) => {
        return http.post("pur_in/get_purin_bill_detail", data, opts)
    },

    /**
     * 清空入库列表
     * @param data
     * @param opts
     * @returns {Promise<unknown>}
     */
    clearPurin: (data, opts = {}) => {
        return http.post("pur_in/delete_user_purin", data, opts)
    },

    /**
     * 删除入库详细项
     * @param data
     * @param opts
     * @returns {Promise<unknown>}
     */
    deletePurinMaterial: (data, opts = {}) => {
        return http.post("pur_in/delete_user_purin_material", data, opts)
    },

    /**
     * 删除入库详细项
     * @param data
     * @param opts
     * @returns {Promise<unknown>}
     */
    deletePurinMaterialBox: (data, opts = {}) => {
        return http.post("pur_in/delete_user_purin_material_box", data, opts)
    },

    /**
     * 确定入库
     * @param data
     * @param opts
     * @returns {Promise<unknown>}
     */
    savePurin: (data, opts = {}) => {
        return http.post("pur_in/save_user_purin", data, opts)
    },
	
	/**
	 * 创建 包材采购入库 单
	 * @param data
	 * @param opts
	 * @returns {Promise<unknown>}
	 */
	auditPurinOrder: (data, opts = {}) => {
	    return http.post("pur_in/audit_purin_order", data, opts)
	},
	
	/**
	 * 获取 包材入库单列表
	 * @param data
	 * @param opts
	 * @returns {Promise<unknown>}
	 */
	getCreatedBcPurinList: (data, opts = {}) => {
	    return http.post("pur_in/get_created_bcPurin_list", data, opts)
	},
	
	/**
	 * 清空
	 * @param data
	 * @param opts
	 * @returns {Promise<unknown>}
	 */
	deleteUserPrdpick(data, opts = {}) {
		return http.post("prd_pick/delete_user_prdpick", data, opts)
	},
	
	/**
	 * 保存生产领料单(到审核阶段)
	 * @param data
	 * @param opts
	 * @returns {Promise<unknown>}
	 */
	saveUserPrdPick(data, opts = {}) {
		return http.post("prd_pick/save_user_prd_pick", data, opts)
	},
	
	/**
	 * 获取用户临时生产领料物料箱号列表
	 * @param data
	 * @param opts
	 * @returns {Promise<unknown>}
	 */
	getUserPrdpickMaterialBox(data, opts = {}) {
		return http.post("prd_pick/get_user_prdpick_material_box", data, opts)
	},
	
	/**
	 * 获取用户临时生产领料物料列表
	 * @param data
	 * @param opts
	 * @returns {Promise<unknown>}
	 */
	getUserPrdpickMaterial(data, opts = {}) {
		return http.post("prd_pick/get_user_prdpick_material", data, opts)
	},
	
	/**
	 * 获取生产领料单分录的箱号详细
	 * @param data
	 * @param opts
	 * @returns {Promise<unknown>}
	 */
	getPrdpickBillDetailBox(data, opts = {}) {
		return http.post("prd_pick/get_prdpick_bill_detail_box", data, opts)
	},

	/**
	 * 添加用户临时生产领料物料箱号
	 * @param data
	 * @param opts
	 * @returns {Promise<unknown>}
	 */
	addUserPrdpickMaterialBox(data, opts = {}) {
		return http.post("prd_pick/add_user_prdpick_material_box", data, opts)
	},

	/**
	 * 获取
	 * @param data
	 * @param opts
	 * @returns {Promise<unknown>}
	 */
	getInventoryMaterialByBox(data, opts = {}) {
		return http.post("inventory/get_material_by_box", data, opts)
	},

	/**
	 * 删除用户临时生产领料物料
	 * @param data
	 * @param opts
	 * @returns {Promise<unknown>}
	 */
	deleteUserPrdpickMaterial(data, opts = {}) {
		return http.post("prd_pick/delete_user_prdpick_material", data, opts)
	},

	/**
	 * 删除用户临时生产领料物料箱号
	 * @param data
	 * @param opts
	 * @returns {Promise<unknown>}
	 */
	deleteUserPrdpickMaterialBox(data, opts = {}) {
		return http.post("prd_pick/delete_user_prdpick_material_box", data, opts)
	},

	/**
	 * 根据RFID从采购收货单中获取物料
	 * @param data
	 * @param opts
	 * @returns {Promise<unknown>}
	 */
	getMaterialByRfid(data, opts = {}) {
		return http.post("pur_col/get_material_by_rfid", data, opts)
	},

	/**
	 * 添加用户临时采购入库物料箱号
	 * @param data
	 * @param opts
	 * @returns {Promise<unknown>}
	 */
    addUserPurinMaterialBoxList(data, opts = {}) {
		return http.post("pur_in/add_user_purin_material_box_list", data, opts)
	},
	
	/**
	 * ************************************
	 * 生产入库api
	 * ************************************
	 */
	
	/**
	 * rfid
	 * @param data
	 * @param opts
	 * @returns {Promise<unknown>}
	 */
	getMaterialByRfidPrdCol(data, opts = {}) {
		return http.post("prd_col/get_material_by_rfid", data, opts)
	},
	/**
	 * rfid
	 * @param data
	 * @param opts
	 * @returns {Promise<unknown>}
	 */
	addUserPrdinMaterialBoxList(data, opts = {}) {
		return http.post("prd_in/add_user_prdin_material_box_list", data, opts)
	},
	
	/**
	 * 查物料列表
	 * @param data
	 * @param opts
	 * @returns {Promise<unknown>}
	 */
	getUserPrdinMaterial(data, opts = {}) {
		return http.post("prd_in/get_user_prdin_material", data, opts)
	},
	
	/**
	 * 查物料箱子
	 * @param data
	 * @param opts
	 * @returns {Promise<unknown>}
	 */
	getUserPrdinMaterialBox(data, opts = {}) {
		return http.post("prd_in/get_user_prdin_material_box", data, opts)
	},
	
	/**
	 * 删除（清空）
	 * @param data
	 * @param opts
	 * @returns {Promise<unknown>}
	 */
	deleteUserPrdin(data, opts = {}) {
		return http.post("prd_in/delete_user_prdin", data, opts)
	},
	
	/**
	 * 删箱子
	 * @param data
	 * @param opts
	 * @returns {Promise<unknown>}
	 */
	deleteUserPrdinMaterialBox(data, opts = {}) {
		return http.post("prd_in/delete_user_prdin_material_box", data, opts)
	},
	
	/**
	 * 删物料
	 * @param data
	 * @param opts
	 * @returns {Promise<unknown>}
	 */
	deleteUserPrdinMaterial(data, opts = {}) {
		return http.post("prd_in/delete_user_prdin_material", data, opts)
	},
	
	/**
	 * 加之前查物料
	 * @param data
	 * @param opts
	 * @returns {Promise<unknown>}
	 */
	getMaterialByBoxProCol(data, opts = {}) {
		return http.post("prd_col/get_material_by_box", data, opts)
	},
	
	/**
	 * 加箱子
	 * @param data
	 * @param opts
	 * @returns {Promise<unknown>}
	 */
	addUserPrdinMaterialBox(data, opts = {}) {
		return http.post("prd_in/add_user_prdin_material_box", data, opts)
	},
	
	/**
	 * 入库
	 * @param data
	 * @param opts
	 * @returns {Promise<unknown>}
	 */
	saveUserPrdin(data, opts = {}) {
		return http.post("prd_in/save_user_prdin", data, opts)
	},
	
	/**
	 * ************************************
	 * 生产领料api
	 * ************************************
	 *
	 /
	 
	 /**
	  * 添加箱子rfid
	  * @param data
	  * @param opts
	  * @returns {Promise<unknown>}
	  */
	 addUserPrdpickMaterialBoxList(data, opts = {}) {
	 	return http.post("prd_pick/add_user_prdpick_material_box_list", data, opts)
	 },
	
	/**
	 * ************************************
	 * 销售揽货api
	 * ************************************
	 *
	 /
	
	/**
	 * 查物料列表
	 * @param data
	 * @param opts
	 * @returns {Promise<unknown>}
	 */
	addUserSaleoutMaterialBoxList(data, opts = {}) {
		return http.post("sale_out/add_user_saleout_material_box_list", data, opts)
	},
	
	/**
	 * 查物料列表
	 * @param data
	 * @param opts
	 * @returns {Promise<unknown>}
	 */
	getUserSaleoutMaterial(data, opts = {}) {
		return http.post("sale_out/get_user_saleout_material", data, opts)
	},
	
	/**
	 * 查物料箱子
	 * @param data
	 * @param opts
	 * @returns {Promise<unknown>}
	 */
	getUserSaleoutMaterialBox(data, opts = {}) {
		return http.post("sale_out/get_user_saleout_material_box", data, opts)
	},
	
	/**
	 * 删除（清空）
	 * @param data
	 * @param opts
	 * @returns {Promise<unknown>}
	 */
	deleteUserSaleout(data, opts = {}) {
		return http.post("sale_out/delete_user_saleout", data, opts)
	},
	
	/**
	 * 删箱子
	 * @param data
	 * @param opts
	 * @returns {Promise<unknown>}
	 */
	deleteUserSaleoutMaterialBox(data, opts = {}) {
		return http.post("sale_out/delete_user_saleout_material_box", data, opts)
	},
	
	/**
	 * 删物料
	 * @param data
	 * @param opts
	 * @returns {Promise<unknown>}
	 */
	deleteUserSaleoutMaterial(data, opts = {}) {
		return http.post("sale_out/delete_user_saleout_material", data, opts)
	},
	
	/**
	 * 加箱子
	 * @param data
	 * @param opts
	 * @returns {Promise<unknown>}
	 */
	addUserSaleoutMaterialBox(data, opts = {}) {
		return http.post("sale_out/add_user_saleout_material_box", data, opts)
	},
	
	/**
	 * 加箱子
	 * @param data
	 * @param opts
	 * @returns {Promise<unknown>}
	 */
	saveUserSaleOut(data, opts = {}) {
		return http.post("sale_out/save_user_sale_out", data, opts)
	},
	
	/**
	 * ************************************
	 * 其他入库api
	 * ************************************
	 */
	
	/**
	 * 根据RFID从采购收货单中获取物料
	 * @param data
	 * @param opts
	 * @returns {Promise<unknown>}
	 */
	getMaterialByRfidOtherCol(data, opts = {}) {
		return http.post("other_col/get_material_by_rfid", data, opts)
	},
	
	
	/**
	 * 添加用户临时采购入库物料箱号
	 * @param data
	 * @param opts
	 * @returns {Promise<unknown>}
	 */
	addUserOtherInMaterialBoxList(data, opts = {}) {
		return http.post("other_in/add_user_otherin_material_box_list", data, opts)
	},
	
	/**
	 * 获取用户临时其他入库物料列表
	 * @param data
	 * @param opts
	 * @returns {Promise<unknown>}
	 */
	getUserOtherinMaterial(data, opts = {}) {
		return http.post("other_in/get_user_otherin_material", data, opts)
	},
	
	/**
	 * 获取用户临时其他入库物料箱号列表
	 * @param data
	 * @param opts
	 * @returns {Promise<unknown>}
	 */
	getUserOtherinMaterialBox(data, opts = {}) {
		return http.post("other_in/get_user_otherin_material_box", data, opts)
	},
	
	/**
	 * 编辑用户临时其他入库物料箱号
	 * @param data
	 * @param opts
	 * @returns {Promise<unknown>}
	 */
	UpdateUserOtherinMaterial(data, opts = {}) {
		return http.post("other_in/update_user_otherin_material_box", data, opts)
	},
	
	/**
	 * 删除用户临时其他入库单（清空）
	 * @param data
	 * @param opts
	 * @returns {Promise<unknown>}
	 */
	deleteUserOtherin(data, opts = {}) {
		return http.post("other_in/delete_user_otherin", data, opts)
	},
	
	/**
	 * 删除用户临时其他入库物料
	 * @param data
	 * @param opts
	 * @returns {Promise<unknown>}
	 */
	deleteUserOtherinMaterial(data, opts = {}) {
		return http.post("other_in/delete_user_otherin_material", data, opts)
	},
	
	/**
	 * 删除用户临时其他入库物料箱号
	 * @param data
	 * @param opts
	 * @returns {Promise<unknown>}
	 */
	deleteUserOtherinMaterialBox(data, opts = {}) {
		return http.post("other_in/delete_user_otherin_material_box", data, opts)
	},
	
	/**
	 * 添加用户临时其他入库物料箱号 
	 * @param data
	 * @param opts
	 * @returns {Promise<unknown>}
	 */
	addUserOtherinMaterialBox(data, opts = {}) {
		return http.post("other_in/add_user_otherin_material_box", data, opts)
	},
	
	/**
	 * 保存其他入库单(到审核阶段) 
	 * @param data
	 * @param opts
	 * @returns {Promise<unknown>}
	 */
	saveUserOtherIn (data, opts = {}) {
		return http.post("other_in/save_user_other_in", data, opts)
	},
	
	/**
	 * 获取用户临时其他入库物料列表
	 * @param data
	 * @param opts
	 * @returns {Promise<unknown>}
	 */
	getMaterialByBoxCol(data, opts = {}) {
		return http.post("other_col/get_material_by_box", data, opts)
	},
	
	/**
	 * ************************************
	 * 其他出库api
	 * ************************************
	 */
	
	/**
	 * 查物料rfid
	 * @param data
	 * @param opts
	 * @returns {Promise<unknown>}
	 */
	getMaterialByRfidInStock(data, opts = {}) {
		return http.post("inventory/get_material_by_rfid_in_stock", data, opts)
	},
	
	
	/**
	 * 添加物料rfid
	 * @param data
	 * @param opts
	 * @returns {Promise<unknown>}
	 */
	addUserOtheroutMaterialBoxList(data, opts = {}) {
		return http.post("other_out/add_user_otherout_material_box_list", data, opts)
	},
	
	/**
	 * 查物料列表
	 * @param data
	 * @param opts
	 * @returns {Promise<unknown>}
	 */
	getUserOtheroutMaterial(data, opts = {}) {
		return http.post("other_out/get_user_otherout_material", data, opts)
	},
	
	/**
	 * 查物料箱子
	 * @param data
	 * @param opts
	 * @returns {Promise<unknown>}
	 */
	getUserOtheroutMaterialBox(data, opts = {}) {
		return http.post("other_out/get_user_otherout_material_box", data, opts)
	},
	
	/**
	 * 删除（清空）
	 * @param data
	 * @param opts
	 * @returns {Promise<unknown>}
	 */
	deleteUserOtherout(data, opts = {}) {
		return http.post("other_out/delete_user_otherout", data, opts)
	},
	
	/**
	 * 删箱子
	 * @param data
	 * @param opts
	 * @returns {Promise<unknown>}
	 */
	deleteUserOtheroutMaterialBox(data, opts = {}) {
		return http.post("other_out/delete_user_otherout_material_box", data, opts)
	},
	
	/**
	 * 删物料
	 * @param data
	 * @param opts
	 * @returns {Promise<unknown>}
	 */
	deleteUserOtheroutMaterial(data, opts = {}) {
		return http.post("other_out/delete_user_otherout_material", data, opts)
	},
	
	/**
	 * 加箱子
	 * @param data
	 * @param opts
	 * @returns {Promise<unknown>}
	 */
	addUserOtheroutMaterialBox(data, opts = {}) {
		return http.post("other_out/add_user_otherout_material_box", data, opts)
	},
	
	/**
	 * 其他出库-保存
	 * @param data
	 * @param opts
	 * @returns {Promise<unknown>}
	 */
	saveUserOtherOut(data, opts = {}) {
		return http.post("other_out/save_user_other_out", data, opts)
	},
	
	/**
	 * 其他出库-立即出库
	 * @param data
	 * @param opts
	 * @returns {Promise<unknown>}
	 */
	auditOtherOutOrder(data, opts = {}) {
		return http.post("other_out/audit_other_out_order", data, opts)
	},
	
	/**
	 * ************************************
	 * 盘点api
	 * ************************************
	 */
	
	/**
	 * 盘点作业列表
	 * @param data
	 * @param opts
	 * @returns {Promise<unknown>}
	 */
	getUserTask(data, opts = {}) {
		return http.post("stock_take/get_user_task", data, opts)
	},
	
	/**
	 * 查盘点作业详细列表
	 * @param data
	 * @param opts
	 * @returns {Promise<unknown>}
	 */
	getUserTaskDetail(data, opts = {}) {
		return http.post("stock_take/get_user_task_detail", data, opts)
	},
	
	/**
	 * 查盘点作业详细箱子列表
	 * @param data
	 * @param opts
	 * @returns {Promise<unknown>}
	 */
	getUserTaskDetailBox(data, opts = {}) {
		return http.post("stock_take/get_user_task_detail_box", data, opts)
	},
	
	/**
	 * 盘点作业扫出来了添加
	 * @param data
	 * @param opts
	 * @returns {Promise<unknown>}
	 */
	addUserTaskDetailBox(data, opts = {}) {
		return http.post("stock_take/add_user_task_detail_box", data, opts)
	},
	
	/**
	 * 盘点作业删除物料
	 * @param data
	 * @param opts
	 * @returns {Promise<unknown>}
	 */
	deleteUserTaskDetail(data, opts = {}) {
		return http.post("stock_take/delete_user_detail", data, opts)
	},
	
	/**
	 * 盘点作业删除箱子
	 * @param data
	 * @param opts
	 * @returns {Promise<unknown>}
	 */
	deleteUserTaskDetailBox(data, opts = {}) {
		return http.post("stock_take/delete_user_detail_box", data, opts)
	},
	
	/**
	 * 盘点作业rfid添加
	 * @param data
	 * @param opts
	 * @returns {Promise<unknown>}
	 */
	addUserTaskDetailBoxList(data, opts = {}) {
		return http.post("stock_take/add_user_task_detail_box_list", data, opts)
	},
	
	/**
	 * 盘点作业完成
	 * @param data
	 * @param opts
	 * @returns {Promise<unknown>}
	 */
	saveUserTask(data, opts = {}) {
		return http.post("stock_take/save_user_task", data, opts)
	},
	
	/**
	 * 盘点作业扫码
	 * @param data
	 * @param opts
	 * @returns {Promise<unknown>}
	 */
	getStockTakeMaterialByBox(data, opts = {}) {
		return http.post("stock_take/get_material_by_box", data, opts)
	},
	
	/**
	 * 盘点作业rfid扫码
	 * @param data
	 * @param opts
	 * @returns {Promise<unknown>}
	 */
	getStockTakeMaterialByRfidInStock(data, opts = {}) {
		return http.post("stock_take/get_material_by_rfid_in_stock", data, opts)
	},
	
    /**
     * 仓位列表
     * @param data
     * @param opts
     * @returns {Promise<unknown>}
     */
    getLocationList: (data, opts = {}) => {
        return http.post("stock_take/get_location_list", data, opts)
    },
	
    /**
     * 查询有效rfid数量
     * @param data
     * @param opts
     * @returns {Promise<unknown>}
     */
    getRfidCount: (data, opts = {}) => {
        return http.post("stock_take/get_rfid_count", data, opts)
    },
    /**
     * 查询有效boxNo数量
     * @param data
     * @param opts
     * @returns {Promise<unknown>}
     */
    getBoxNoCount: (data, opts = {}) => {
        return http.post("stock_take/get_boxNo_count", data, opts)
    },
    /**
     * 查询总箱数和已扫数
     * @param data
     * @param opts
     * @returns {Promise<unknown>}
     */
    getBoxCount: (data, opts = {}) => {
        return http.post("stock_take/get_box_count", data, opts)
    },
	
	
	/**
	 * ************************************
	 * 调拨模块接口
	 * ************************************
	 */
	
	/**
	 * 查询物料列表
	 * @param data
	 * @param opts
	 * @returns {Promise<unknown>}
	 */
	getAllocationUserMaterial: (data, opts = {}) => {
	    return http.post("allocation/get_user_material", data, opts)
	},
	/**
	 * 查询箱子列表
	 * @param data
	 * @param opts
	 * @returns {Promise<unknown>}
	 */
	getAllocationUserMaterialBox: (data, opts = {}) => {
	    return http.post("allocation/get_user_material_box", data, opts)
	},
	/**
	 * 删除物料
	 * @param data
	 * @param opts
	 * @returns {Promise<unknown>}
	 */
	deleteAllocationMaterial: (data, opts = {}) => {
	    return http.post("allocation/delete_material_allocation", data, opts)
	},
	/**
	 * 删除箱子
	 * @param data
	 * @param opts
	 * @returns {Promise<unknown>}
	 */
	deleteAllocationMaterialBox: (data, opts = {}) => {
	    return http.post("allocation/delete_box_allocation", data, opts)
	},
	/**
	 * 调拨rfid获取
	 * @param data
	 * @param opts
	 * @returns {Promise<unknown>}
	 */
	getUserAllocationRfid: (data, opts = {}) => {
	    return http.post("allocation/get_user_allocation_rfid", data, opts)
	},
	/**
	 * 调拨扫箱子
	 * @param data
	 * @param opts
	 * @returns {Promise<unknown>}
	 */
	getUserAllocationBoxList: (data, opts = {}) => {
	    return http.post("allocation/get_user_allocation_box_list", data, opts)
	},
	/**
	 * 添加箱子
	 * @param data
	 * @param opts
	 * @returns {Promise<unknown>}
	 */
	addUserAllocationBox: (data, opts = {}) => {
	    return http.post("allocation/add_user_allocation_box", data, opts)
	},
	/**
	 * 批量添加箱子
	 * @param data
	 * @param opts
	 * @returns {Promise<unknown>}
	 */
	addUserAllocationBoxList: (data, opts = {}) => {
	    return http.post("allocation/add_user_allocation_box_list", data, opts)
	},
	/**
	 * 完成
	 * @param data
	 * @param opts
	 * @returns {Promise<unknown>}
	 */
	saveUserAllocation: (data, opts = {}) => {
	    return http.post("allocation/save_user_allocation", data, opts)
	},
	/**
	 * 檢查
	 * @param data
	 * @param opts
	 * @returns {Promise<unknown>}
	 */
	auditUserAllocation: (data, opts = {}) => {
	    return http.post("allocation/audit_user_allocation", data, opts)
	},
	/**
	 * 传仓库仓位
	 * @param data
	 * @param opts
	 * @returns {Promise<unknown>}
	 */
	updateAllAllocation: (data, opts = {}) => {
	    return http.post("allocation/update_all_allocation", data, opts)
	},
	/**
	 * 完成
	 * @param data
	 * @param opts
	 * @returns {Promise<unknown>}
	 */
	allocationGetUserTask: (data, opts = {}) => {
	    return http.post("allocation/get_user_task", data, opts)
	},
	/**
	 * 获取方案下层物料
	 * @param data
	 * @param opts
	 * @returns {Promise<unknown>}
	 */
	getAllocationTaskDetail: (data, opts = {}) => {
	    return http.post("allocation/get_allocation_task_detail", data, opts)
	},
	/**
	 * 获取方案下层物料箱子
	 * @param data
	 * @param opts
	 * @returns {Promise<unknown>}
	 */
	getAllocationTaskDetailBox: (data, opts = {}) => {
	    return http.post("allocation/get_allocation_task_detail_box", data, opts)
	},
	/**
	 * pda添加任务中的箱号
	 * @param data
	 * @param opts
	 * @returns {Promise<unknown>}
	 */
	addTaskAllocationBox: (data, opts = {}) => {
	    return http.post("allocation/add_task_allocation_box", data, opts)
	},
	/**
	 * pda添加任务中的箱号rfid
	 * @param data
	 * @param opts
	 * @returns {Promise<unknown>}
	 */
	rfidAddTaskAllocationBox: (data, opts = {}) => {
	    return http.post("allocation/rfid_add_task_allocation_box", data, opts)
	},
	/**
	 * pda获取任务中的箱号
	 * @param data
	 * @param opts
	 * @returns {Promise<unknown>}
	 */
	getTaskAllocationBox: (data, opts = {}) => {
	    return http.post("allocation/get_task_allocation_box", data, opts)
	},
	/**
	 * pda获取任务中的箱号rfid
	 * @param data
	 * @param opts
	 * @returns {Promise<unknown>}
	 */
	getTaskAllocatioBoxRfid: (data, opts = {}) => {
	    return http.post("allocation/get_task_allocation_box_rfid", data, opts)
	},
	
	/**
	 * ************************************
	 * 包材入库模块接口
	 * ************************************
	 */
	
	/**
	 * 包材入库
	 * @param data
	 * @param opts
	 * @returns {Promise<unknown>}
	 */
	getPurOrderBillPacIn: (data, opts = {}) => {
	    return http.post("pac_in/get_purOrder_bill", data, opts)
	},
	/**
	 * 包材入库详情
	 * @param data
	 * @param opts
	 * @returns {Promise<unknown>}
	 */
	getPurOrderBillDetail: (data, opts = {}) => {
	    return http.post("pac_in/get_purOrder_bill_detail", data, opts)
	},
	/**
	 * 包材入库详情
	 * @param data
	 * @param opts
	 * @returns {Promise<unknown>}
	 */
	savePurOrderBill: (data, opts = {}) => {
	    return http.post("pac_in/create_pur_in_settlement_bill", data, opts)
	},
	/**
	 * 修改数量
	 * @param data
	 * @param opts
	 * @returns {Promise<unknown>}
	 */
	updatePurOrderCount: (data, opts = {}) => {
	    return http.post("pac_in/update_purOrder_count", data, opts)
	},
	
	
	/**
	 * ************************************
	 * 托盘绑定api
	 * ************************************
	 */
	
	/**
	 * 获取托盘信息列表
	 * @param data
	 * @param opts
	 * @returns {Promise<unknown>}
	 */
	getTrayList: (data, opts = {}) => {
	    return http.post("tray/get_tray_list", data, opts)
	},
	
	/**
	 * 托盘管理获取物料信息（箱号）
	 * @param data
	 * @param opts
	 * @returns {Promise<unknown>}
	 */
	getMaterialBoxNoTray: (data, opts = {}) => {
	    return http.post("tray/get_material_boxNo_tray", data, opts)
	},
	
	/**
	 * 托盘管理获取物料信息（箱号）
	 * @param data
	 * @param opts
	 * @returns {Promise<unknown>}
	 */
	scanTray: (data, opts = {}) => {
	    return http.post("tray/scan_tray", data, opts)
	},
	
	/**
	 * 托盘管理获取物料信息（rfid）
	 * @param data
	 * @param opts
	 * @returns {Promise<unknown>}
	 */
	getMaterialRfidNoTray: (data, opts = {}) => {
	    return http.post("tray/get_material_rfid_tray", data, opts)
	},
	
	/**
	 * 托盘管理添加箱子
	 * @param data
	 * @param opts
	 * @returns {Promise<unknown>}
	 */
	addTrayBox: (data, opts = {}) => {
	    return http.post("tray/add_tray_box", data, opts)
	},
	
	/**
	 * 托盘删除物料
	 * @param data
	 * @param opts
	 * @returns {Promise<unknown>}
	 */
	deleteUserMaterialTray: (data, opts = {}) => {
	    return http.post("tray/delete_user_material_tray", data, opts)
	},
	
	/**
	 * 托盘删除箱子
	 * @param data
	 * @param opts
	 * @returns {Promise<unknown>}
	 */
	deleteUserBoxTray: (data, opts = {}) => {
	    return http.post("tray/delete_user_box_tray", data, opts)
	},
	
	/**
	 * 获取临时箱子列表
	 * @param data
	 * @param opts
	 * @returns {Promise<unknown>}
	 */
	getUserBoxListTray: (data, opts = {}) => {
	    return http.post("tray/get_user_box_list_tray", data, opts)
	},
	
	/**
	 * 获取临时箱子列表
	 * @param data
	 * @param opts
	 * @returns {Promise<unknown>}
	 */
	createTrayBill: (data, opts = {}) => {
	    return http.post("tray/create_tray_bill", data, opts)
	},
	
	/**
	 * 获取临时物料列表
	 * @param data
	 * @param opts
	 * @returns {Promise<unknown>}
	 */
	getUserMaterialListTray: (data, opts = {}) => {
	    return http.post("tray/get_user_material_list_tray", data, opts)
	},
	
	
	/**
	 * ************************************
	 * 生产任务api
	 * ************************************
	 */
	
	/**
	 * 获取bom物料列表
	 * @param data
	 * @param opts
	 * @returns {Promise<unknown>}
	 */
	saveGetMaterialByKey: (data, opts = {}) => {
	    return http.post("basic/save_get_material_by_key", data, opts)
	},
	/**
	 * 获取bom物料列表
	 * @param data
	 * @param opts
	 * @returns {Promise<unknown>}
	 */
	getBomByKey: (data, opts = {}) => {
		return http.post("basic/get_bom_by_key", data, opts)
	},
	
	/**
	 * 获取车间列表
	 * @param data
	 * @param opts
	 * @returns {Promise<unknown>}
	 */
	getDepartmentList: (data, opts = {}) => {
	    return http.post("basic/get_department_list", data, opts)
	},
	
	/**
	 * 生成物料清单
	 * @param data
	 * @param opts
	 * @returns {Promise<unknown>}
	 */
	taskBillToMaterialList: (data, opts = {}) => {
	    return http.post("prd_task/task_bill_to_material_list", data, opts)
	},
	
	/**
	 * 供应商列表
	 * @param data
	 * @param opts
	 * @returns {Promise<unknown>}
	 */
	getSupplierByKey: (data, opts = {}) => {
	    return http.post("basic/get_supplier_by_key", data, opts)
	},
	
	/**
	 * 获取批次
	 * @param data
	 * @param opts
	 * @returns {Promise<unknown>}
	 */
	getInventoryBatch: (data, opts = {}) => {
	    return http.post("inventory/get_inventory_batch", data, opts)
	},
	
	/**
	 * 创建生产任务
	 * @param data
	 * @param opts
	 * @returns {Promise<unknown>}
	 */
	createPrdTaskBill: (data, opts = {}) => {
	    return http.post("prd_task/create_prd_task_bill", data, opts)
	},
	
	/**
	 * 生产任务列表
	 * @param data
	 * @param opts
	 * @returns {Promise<unknown>}
	 */
	getPrdTaskListPda: (data, opts = {}) => {
	    return http.post("prd_task/get_prd_task_list_pda", data, opts)
	},
	
	/**
	 * 生产任务详情
	 * @param data
	 * @param opts
	 * @returns {Promise<unknown>}
	 */
	getPrdTaskDetail: (data, opts = {}) => {
	    return http.post("prd_task/get_prd_task_detail", data, opts)
	},
	
	/**
	 * 取消打印
	 * @param data
	 * @param opts
	 * @returns {Promise<unknown>}
	 */
	saveTaskNoPrint: (data, opts = {}) => {
	    return http.post("prd_task/save_task_no_print", data, opts)
	},
	
	/**
	 * 物料清单详情
	 * @param data
	 * @param opts
	 * @returns {Promise<unknown>}
	 */
	getMaterialBomDetail: (data, opts = {}) => {
	    return http.post("prd_task/get_material_bom_detail", data, opts)
	},
	
	/**
	 * 扫码获取物料信息
	 * @param data
	 * @param opts
	 * @returns {Promise<unknown>}
	 */
	getMaterialBomBox: (data, opts = {}) => {
	    return http.post("prd_task/get_material_bom_box", data, opts)
	},
	
	/**
	 * 添加物料信息
	 * @param data
	 * @param opts
	 * @returns {Promise<unknown>}
	 */
	addMaterialBomBox: (data, opts = {}) => {
	    return http.post("prd_task/add_material_bom_box", data, opts)
	},
	
	/**
	 * 获取用户临时（生产领料单）生产领料物料列表
	 * @param data
	 * @param opts
	 * @returns {Promise<unknown>}
	 */
	getUserMaterialBomPickMaterial: (data, opts = {}) => {
	    return http.post("prd_task/get_user_material_bom_pick_material", data, opts)
	},
	
	/**
	 * 创建
	 * @param data
	 * @param opts
	 * @returns {Promise<unknown>}
	 */
	createMaterialBomPickBill: (data, opts = {}) => {
	    return http.post("prd_task/create_material_bom_pick_bill", data, opts)
	},
	/**
	 * 特殊创建领料
	 * @param data
	 * @param opts
	 * @returns {Promise<unknown>}
	 */
	createMaterialBomPickBillSpecial: (data, opts = {}) => {
	    return http.post("prd_task/create_material_bom_pick_bill_special", data, opts)
	},
	/**
	 * 审核退料订单
	 * @param data
	 * @param opts
	 * @returns {Promise<unknown>}
	 */
	auditMaterialBomPickBill: (data, opts = {}) => {
	    return http.post("prd_task/audit_material_bom_pick_bill", data, opts)
	},
	
	/**
	 * 审核补料订单
	 * @param data
	 * @param opts
	 * @returns {Promise<unknown>}
	 */
	auditMaterialBomSupplementBill: (data, opts = {}) => {
	    return http.post("prd_task/audit_material_bom_supplement_bill", data, opts)
	},
	
	/**
	 * 根据生产任务单号查询领料单
	 * @param data
	 * @param opts
	 * @returns {Promise<unknown>}
	 */
	getMaterialPickBillTask: (data, opts = {}) => {
	    return http.post("prd_task/get_material_pick_bill_task", data, opts)
	},
	
	/**
	 * 取用户临时(生产领料单)生产领料物料箱号列表
	 * @param data
	 * @param opts
	 * @returns {Promise<unknown>}
	 */
	getUserMaterialBomPickMaterialBox: (data, opts = {}) => {
	    return http.post("prd_task/get_user_material_bom_pick_material_box", data, opts)
	},
	
	/**
	 * 删除用户临时(生产领料单)生产领料物料
	 * @param data
	 * @param opts
	 * @returns {Promise<unknown>}
	 */
	deleteUserMaterialBomPickMaterial: (data, opts = {}) => {
	    return http.post("prd_task/delete_user_material_bom_pick_material", data, opts)
	},
	
	/**
	 * 删除用户临时(生产领料单)生产领料物料箱号
	 * @param data
	 * @param opts
	 * @returns {Promise<unknown>}
	 */
	deleteUserMaterialBomPickMaterialBox: (data, opts = {}) => {
	    return http.post("prd_task/delete_user_material_bom_pick_material_box", data, opts)
	},
	
	/**
	 * 用料清单补料添加箱子
	 * @param data
	 * @param opts
	 * @returns {Promise<unknown>}
	 */
	addMaterialBomSupplementBox: (data, opts = {}) => {
	    return http.post("prd_task/add_material_bom_supplement_box", data, opts)
	},
	
	/**
	 * 创建（生产领料单）补料订单
	 * @param data
	 * @param opts
	 * @returns {Promise<unknown>}
	 */
	createMaterialBomSupplementBill: (data, opts = {}) => {
	    return http.post("prd_task/create_material_bom_supplement_bill", data, opts)
	},
	
	/**
	 * 获取用户临时（生产领料单）生产补料物料列表
	 * @param data
	 * @param opts
	 * @returns {Promise<unknown>}
	 */
	getUserMaterialBomSupplementMaterial: (data, opts = {}) => {
	    return http.post("prd_task/get_user_material_bom_supplement_material", data, opts)
	},
	
	/**
	 * 获取用户临时(生产领料单)生产补料物料箱号列表
	 * @param data
	 * @param opts
	 * @returns {Promise<unknown>}
	 */
	getUserMaterialBomSupplementMaterialBox: (data, opts = {}) => {
	    return http.post("prd_task/get_user_material_bom_supplement_material_box", data, opts)
	},
	
	/**
	 * 删除用户临时(生产领料单)生产补料物料
	 * @param data
	 * @param opts
	 * @returns {Promise<unknown>}
	 */
	deleteUserMaterialBomSupplementMaterial: (data, opts = {}) => {
	    return http.post("prd_task/delete_user_material_bom_supplement_material", data, opts)
	},
	
	/**
	 * 删除用户临时(生产领料单)生产补料物料
	 * @param data
	 * @param opts
	 * @returns {Promise<unknown>}
	 */
	deleteUserMaterialBomSupplementMaterialBox: (data, opts = {}) => {
	    return http.post("prd_task/delete_user_material_bom_supplement_material_box", data, opts)
	},
	
	/**
	 * 删除临时箱子
	 * @param data
	 * @param opts
	 * @returns {Promise<unknown>}
	 */
	deleteUserMaterialBomReturnMaterialBox: (data, opts = {}) => {
	    return http.post("prd_task/delete_user_material_bom_return_material_box", data, opts)
	},
	
	/**
	 * 删除临时物料
	 * @param data
	 * @param opts
	 * @returns {Promise<unknown>}
	 */
	deleteUserMaterialBomReturnMaterial: (data, opts = {}) => {
	    return http.post("prd_task/delete_user_material_bom_return_material", data, opts)
	},
	
	/**
	 * 查临时退料箱子
	 * @param data
	 * @param opts
	 * @returns {Promise<unknown>}
	 */
	getUserMaterialBomReturnMaterialBox: (data, opts = {}) => {
	    return http.post("prd_task/get_user_material_bom_return_material_box", data, opts)
	},
	
	/**
	 * 查临时退料物料
	 * @param data
	 * @param opts
	 * @returns {Promise<unknown>}
	 */
	getUserMaterialBomReturnMaterial: (data, opts = {}) => {
	    return http.post("prd_task/get_user_material_bom_return_material", data, opts)
	},
	
	/**
	 * 创建退料表
	 * @param data
	 * @param opts
	 * @returns {Promise<unknown>}
	 */
	createMaterialBomReturnBill: (data, opts = {}) => {
	    return http.post("prd_task/create_material_bom_return_bill", data, opts)
	},
	
	/**
	 * 去领料补料里扫箱码
	 * @param data
	 * @param opts
	 * @returns {Promise<unknown>}
	 */
	getProduceReturnBox: (data, opts = {}) => {
	    return http.post("prd_task/get_produce_return_box", data, opts)
	},
	
	/**
	 * 去领料补料里扫箱码Rfid
	 * @param data
	 * @param opts
	 * @returns {Promise<unknown>}
	 */
	getProduceReturnRfid: (data, opts = {}) => {
	    return http.post("prd_task/get_produce_return_rfid", data, opts)
	},
	
	/**
	 * 用生产任务单号 去领补里查到箱子信息列出来
	 * @param data
	 * @param opts
	 * @returns {Promise<unknown>}
	 */
	getProduceReturnList: (data, opts = {}) => {
	    return http.post("prd_task/get_produce_return_list", data, opts)
	},
	
	/**
	 * 退料任务单 (通过生产单号)
	 * @param data
	 * @param opts
	 * @returns {Promise<unknown>}
	 */
	getPrdReturnListPda: (data, opts = {}) => {
	    return http.post("prd_task/get_prd_return_list_pda", data, opts)
	},
	
	/**
	 * 加到退料表
	 * @param data
	 * @param opts
	 * @returns {Promise<unknown>}
	 */
	addMaterialBomBoxReturn: (data, opts = {}) => {
	    return http.post("prd_task/add_material_bom_box_return", data, opts)
	},
	
	/**
	 * 完成任务单
	 * @param data
	 * @param opts
	 * @returns {Promise<unknown>}
	 */
	savePrdTaskToPrdCol: (data, opts = {}) => {
	    return http.post("prd_task/save_prd_task_to_prd_col", data, opts)
	},
	
	/**
	 * 完成任务单
	 * @param data
	 * @param opts
	 * @returns {Promise<unknown>}
	 */
	getSortingSaveTaskMaterial: (data, opts = {}) => {
	    return http.post("prd_task/get_sorting_save_task_material", data, opts)
	},
	
	/**
	 * 完成任务获取临时收货列表
	 * @param data
	 * @param opts
	 * @returns {Promise<unknown>}
	 */
	saveTaskGetPrdColList: (data, opts = {}) => {
	    return http.post("prd_task/save_task_get_prd_col_list", data, opts)
	},
	
	/**
	 * 完成任务删除临时收货
	 * @param data
	 * @param opts
	 * @returns {Promise<unknown>}
	 */
	saveTaskDeletePrdCol: (data, opts = {}) => {
	    return http.post("prd_task/save_task_delete_prd_col", data, opts)
	},
	
	/**
	 * 完成任务保存临时收货
	 * @param data
	 * @param opts
	 * @returns {Promise<unknown>}
	 */
	saveTaskAddPrdCol: (data, opts = {}) => {
	    return http.post("prd_task/save_task_add_prd_col", data, opts)
	},
	
	/**
	 * 审核
	 * @param data
	 * @param opts
	 * @returns {Promise<unknown>}
	 */
	auditPrdTaskBill: (data, opts = {}) => {
	    return http.post("prd_task/audit_prd_task_bill", data, opts)
	},
	
	/**
	 * 生产扫码入库的扫码
	 * @param data
	 * @param opts
	 * @returns {Promise<unknown>}
	 */
	prdInScanBoxNo: (data, opts = {}) => {
	    return http.post("prd_task/prd_in_scan_boxNo", data, opts)
	},
	
	/**
	 * 生产扫码入库的扫码rfid
	 * @param data
	 * @param opts
	 * @returns {Promise<unknown>}
	 */
	prdInScanRfid: (data, opts = {}) => {
	    return http.post("prd_task/prd_in_scan_rfid", data, opts)
	},
	
	/**
	 * 生产扫码入库加箱子
	 * @param data
	 * @param opts
	 * @returns {Promise<unknown>}
	 */
	addPrdInBoxList: (data, opts = {}) => {
	    return http.post("prd_task/add_prd_in_box_list", data, opts)
	},
	
	/**
	 * 生产扫码入库创建订单
	 * @param data
	 * @param opts
	 * @returns {Promise<unknown>}
	 */
	createPrdInBill: (data, opts = {}) => {
	    return http.post("prd_task/create_prd_in_bill", data, opts)
	},
	
	/**
	 * 获取用户临时（生产领料单）生产入库物料列表
	 * @param data
	 * @param opts
	 * @returns {Promise<unknown>}
	 */
	getUserMaterialBomInMaterial: (data, opts = {}) => {
	    return http.post("prd_task/get_user_material_bom_in_material", data, opts)
	},
	
	/**
	 * 获取用户临时(生产领料单)生产入库物料箱号列表
	 * @param data
	 * @param opts
	 * @returns {Promise<unknown>}
	 */
	getUserMaterialBomInMaterialBox: (data, opts = {}) => {
	    return http.post("prd_task/get_user_material_bom_in_material_box", data, opts)
	},
	
	/**
	 * 删除用户临时(生产领料单)生产入库物料
	 * @param data
	 * @param opts
	 * @returns {Promise<unknown>}
	 */
	deleteUserMaterialBomInMaterial: (data, opts = {}) => {
	    return http.post("prd_task/delete_user_material_bom_in_material", data, opts)
	},
	
	/**
	 * 删除用户临时(生产领料单)生产入库物料
	 * @param data
	 * @param opts
	 * @returns {Promise<unknown>}
	 */
	deleteUserMaterialBomInMaterialBox: (data, opts = {}) => {
	    return http.post("prd_task/delete_user_material_bom_in_material_box", data, opts)
	},
	
	/**
	 * 生产任务 领料
	 * @param data
	 * @param opts
	 * @returns {Promise<unknown>}
	 */
	getPrdTaskListPick: (data, opts = {}) => {
	    return http.post("prd_task/get_prd_task_list_pick", data, opts)
	},
	
	/**
	 * 生产任务 补料 退料 入库
	 * @param data
	 * @param opts
	 * @returns {Promise<unknown>}
	 */
	getPrdTaskListSupplementReturn: (data, opts = {}) => {
	    return http.post("prd_task/get_prd_task_list_supplement_return", data, opts)
	},
	
	/**
	 * 分选的列表查询
	 * @param data
	 * @param opts
	 * @returns {Promise<unknown>}
	 */
	getBomSortingList: (data, opts = {}) => {
	    return http.post("prd_task/get_bom_sorting_list", data, opts)
	},
	
	/**
	 * 车间主任确认
	 * @param data
	 * @param opts
	 * @returns {Promise<unknown>}
	 */
	materialBomPickConfirm: (data, opts = {}) => {
	    return http.post("prd_task/material_bom_pick_confirm", data, opts)
	},
	
	/**
	 * 删除生产任务单
	 * @param data
	 * @param opts
	 * @returns {Promise<unknown>}
	 */
	deletePrdTaskBill: (data, opts = {}) => {
	    return http.post("prd_task/delete_prd_task_bill", data, opts)
	},
	
	/**
	 * 根据单号获取任务信息
	 * @param data
	 * @param opts
	 * @returns {Promise<unknown>}
	 */
	getPrdTaskBillNumberReturn: (data, opts = {}) => {
	    return http.post("prd_task/get_prd_task_bill_number_return", data, opts)
	},
	
	/**
	 * 确认反盐入库
	 * @param data
	 * @param opts
	 * @returns {Promise<unknown>}
	 */
	createDesaltingInStockBill: (data, opts = {}) => {
	    return http.post("prd_task/create_desalting_in_stock_bill", data, opts)
	},
	
	/**
	 * 添加反盐物料信息
	 * @param data
	 * @param opts
	 * @returns {Promise<unknown>}
	 */
	addDesaltingInStockBox: (data, opts = {}) => {
	    return http.post("prd_task/add_desalting_in_stock_box", data, opts)
	},
	
	/**
	 * 获取反盐物料列表
	 * @param data
	 * @param opts
	 * @returns {Promise<unknown>}
	 */
	getUserDesaltingInStockMaterial: (data, opts = {}) => {
	    return http.post("prd_task/get_user_desalting_in_stock_material", data, opts)
	},
	
	/**
	 * 获取反盐物料箱
	 * @param data
	 * @param opts
	 * @returns {Promise<unknown>}
	 */
	getUserDesaltingInStockMaterialBox: (data, opts = {}) => {
	    return http.post("prd_task/get_user_desalting_in_stock_material_box", data, opts)
	},
	
	/**
	 * 删除物料
	 * @param data
	 * @param opts
	 * @returns {Promise<unknown>}
	 */
	deleteUserDesaltingInStockMaterial: (data, opts = {}) => {
	    return http.post("prd_task/delete_user_desalting_in_stock_material", data, opts)
	},
	/**
	 * 删除箱号
	 * @param data
	 * @param opts
	 * @returns {Promise<unknown>}
	 */
	deleteUserDesaltingInStockMaterialBox: (data, opts = {}) => {
	    return http.post("prd_task/delete_user_desalting_in_stock_material_box", data, opts)
	},
	
	/**
	 * 完工
	 * @param data
	 * @param opts
	 * @returns {Promise<unknown>}
	 */
	prdTaskEnd: (data, opts = {}) => {
	    return http.post("prd_task/prd_task_end", data, opts)
	},
	
	/**
	 * 成品入库获取物料
	 * @param data
	 * @param opts
	 * @returns {Promise<unknown>}
	 */
	getTaskMaterialByBox: (data, opts = {}) => {
	    return http.post("prd_task/get_material_by_box", data, opts)
	},
	
	/**
	 * 入库
	 * @param data
	 * @param opts
	 * @returns {Promise<unknown>}
	 */
	createSimplePrdIn: (data, opts = {}) => {
	    return http.post("prd_task/create_simple_prd_in", data, opts)
	},

	/**
	 * 获取销售单详情
	 * @param data
	 * @param opts
	 * @returns {Promise<unknown>}
	 */
	getSaleStoreBillSetail: (data, opts = {}) => {
	    return http.post("sale_out/get_sale_store_bill_detail", data, opts)
	},
	
	/**
	 * 获取当前仓库列表数量
	 * @param data
	 * @param opts
	 * @returns {Promise<unknown>}
	 */
	getSaleAllocationAddMaterialCount: (data, opts = {}) => {
	    return http.post("allocation/get_sale_allocation_add_material_count", data, opts)
	},
	
	/**
	 * 销售订单调拨查询临时箱子
	 * @param data
	 * @param opts
	 * @returns {Promise<unknown>}
	 */
	getSaleAllocationAddMaterialBox: (data, opts = {}) => {
	    return http.post("allocation/get_sale_allocation_add_material_box", data, opts)
	},
	
	/**
	 * 删除销售订单调拨临时箱子
	 * @param data
	 * @param opts
	 * @returns {Promise<unknown>}
	 */
	deleteSaleAllocationAddMaterialBox: (data, opts = {}) => {
	    return http.post("allocation/delete_sale_allocation_add_material_box", data, opts)
	},

	/**
	 * 删除追溯码
	 * @param data
	 * @param opts
	 * @returns {Promise<unknown>}
	 */
	deleteBindTraceBack: (data, opts = {}) => {
	    return http.post("sale_out/delete_bind_trace_back", data, opts)
	},
	
	/**
	 * 追溯扫码
	 * @param data
	 * @param opts
	 * @returns {Promise<unknown>}
	 */
	addPrdColAndGetPrdCol: (data, opts = {}) => {
	    return http.post("prd_task/add_prd_col_and_get_prd_col", data, opts)
	},

	/**
	 * 获取和拆箱类型的出库单号
	 * @param data
	 * @param opts
	 * @returns {Promise<unknown>}
	 */
	getOtherOutList: (data, opts = {}) => {
	    return http.post("other_out/get_otherout_bill_PDA", data, opts)
	},

	/**
	 * 获取采购入库单详情
	 * @param data
	 * @param opts
	 * @returns {Promise<unknown>}
	 */
	getPurInByBillNo: (data, opts = {}) => {
	    return http.post("pur_in/get_purin_bill_by_bill_no", data, opts)
	},
	
	/**
	 * 生成采购退货单
	 * @param data
	 * @param opts
	 * @returns {Promise<unknown>}
	 */
	addPurReturn: (data, opts = {}) => {
	    return http.post("pur_in/add_pur_return", data, opts)
	},
}
